package com.datn.utils;

import android.content.Context;
import android.net.ConnectivityManager;

public class NetworkUtils {
	public static boolean isConnected(Context mContext)
	{
	    ConnectivityManager cm = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);
	    if (cm.getActiveNetworkInfo()!=null){
	    	if (cm.getActiveNetworkInfo().isConnected()) return true;
	    }
	    return false;
	}
}
